[cocoa] NSSearchField not working as expected

Posted by Vegar on Stack Overflow See other posts from Stack Overflow or by Vegar
Published on 2010-04-01T19:55:02Z Indexed on 2010/04/01 22:53 UTC
Read the original article Hit count: 636

Hi,

I'm trying to follow Marcus Zarra in his book 'Core Data'. In the book, he makes a small sample application, but it doesn't give much help when things don't work out...

He starts out by visually designing three entities, and then adding array controllers for each entity to the main nib. Second, he adds a tableview and some other visual components to show data from the array controllers.

So far, I have managed to follow, but now he adds a search field to the gui, and binds it to the same array controller as one of the tableviews. Expected behavior would be for the tableview to get filtered when typing in the search field, but nothing happens.

How do I find out what's wrong?

The relevant parts from the nib is as follow:

NSArrayController Recipes
- Mode = Entity
- Enitity Name = Recipe

TableView w/TableColumn
- Value Bind To Recipes
-- Controller Key = arrangedObjects -- Model Key Path = name

Search Field
- Predicate Bind To Recipes
-- Controller Key = filterPredicate
-- Model Key Path = name
-- Display name = predicate
-- Predicate Format = keyPath contains $value

There are no relevant messages in the console.

regards,
-Vegar

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about cocoa-bindings